
app.controller('contentController',function ($scope,contentService) {

    $scope.contentList=[]; //所有类目广告集合,此处共有5类广告

    $scope.findByCategoryId=function(categoryId){

        contentService.findByCategoryId(categoryId).success(
            function (response) {
                $scope.contentList[categoryId]=response;
            }
        )
    }

    //首页点击搜索跳转到搜索页面
    $scope.search=function () {
        location.href="http://localhost:9104/#?keywords="+$scope.keywords;
    }
})